﻿@model IEnumerable<Common.Views.FaultDetailsView>

@{
    ViewBag.Title = "UpdateFaults";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@Html.Action("_FilterFaultsForAdmin", "Home")

<h2>Update Faults</h2>

<table>
    <tr>
        <th>
            FaultID
        </th>
        <th>
            TicketNo
        </th>
        <th>
            Date
        </th>
        <th>
            FaultDetails
        </th>
        <th>
            Status
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
     
    

        <td>
        @Html.HiddenFor(modelItem=> item.Username)
        @Html.HiddenFor(modelItem => item.StatusID)

            @Html.DisplayFor(modelItem => item.FaultID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TicketNo)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Date)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FaultDetails)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Status)
        </td>
        <td>
            @Html.ActionLink("Update Fault Details", "UpdateFaultDetails", new { id = item.FaultID }) 
        </td>
    </tr>
}

</table>
